Skip to content

Fix Moonshine Linux release link error on older glibc#62

Merged
JRufer merged 1 commit into
masterfrom
claude/moonlight-glibc-fix
Jul 5, 2026
Merged

Fix Moonshine Linux release link error on older glibc#62
JRufer merged 1 commit into
masterfrom
claude/moonlight-glibc-fix

Conversation

@JRufer

@JRufer JRufer commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Problem

The v0.3.0 release build failed to link on the ubuntu-22.04 runners:

rust-lld: error: undefined symbol: __isoc23_strtol / __isoc23_strtoll / __isoc23_strtoull
  >>> ... in archive libort_sys (onnxruntime static lib)

The prebuilt ONNX Runtime static library (pyke, pulled in by ort + download-binaries) is compiled against glibc ≥ 2.38, which redirects strtol/strtoul/… to __isoc23_* symbols. The release runners are ubuntu-22.04 (glibc 2.35), which has no such symbols, so the static link fails. (Windows builds are unaffected.)

Fix

Add a tiny C shim (src/isoc23_compat.c, compiled by a new build.rs for the moonshine feature on Linux only) that provides the __isoc23_* symbols by forwarding to the classic libc functions. This keeps the binary linkable and runnable on older glibc, preserving the AppImage's low glibc floor — rather than bumping the runners to ubuntu-24.04, which would raise the minimum glibc for all Linux users (excluding e.g. Debian 12 / Ubuntu 22.04).

cc is added as a build-dependency; it's already in the graph (whisper-rs-sys), so it adds nothing to compile.

Verified

  • Default build unaffected (build.rs no-ops when the feature is off).
  • C shim compiles cleanly under --features moonshine.
  • The link resolution itself only reproduces on the CI release runners (the ONNX Runtime static lib downloads there); this PR's merge re-triggers that build.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GpXWVxBBJvtRgkdMWasSH6


Generated by Claude Code

The release build failed to link on the ubuntu-22.04 runners (glibc 2.35):

  rust-lld: error: undefined symbol: __isoc23_strtol / __isoc23_strtoll / __isoc23_strtoull
    >>> ... in archive libort_sys (onnxruntime static lib)

The prebuilt ONNX Runtime static library (pyke, via ort's download-binaries) is
compiled against glibc >= 2.38, which redirects strtol/strtoul/... to __isoc23_*
symbols that don't exist on glibc 2.35, so the static link fails.

Add a tiny C shim (compiled by build.rs for the moonshine feature on Linux) that
provides the __isoc23_* symbols by forwarding to the classic libc functions.
This keeps the binary linkable and runnable on older glibc, preserving the
AppImage's low glibc floor rather than raising it by building on ubuntu-24.04.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GpXWVxBBJvtRgkdMWasSH6
@JRufer JRufer merged commit 863e6f2 into master Jul 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants